package st.bossbirdroom.lock_screen;

import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;

public class LockScreenPreferencesSaver {

	private final static String PRE_NAME = "LockScreenInfo";

	public static boolean getBoolean(Context context,String tag,boolean defaultValue)
	{
		SharedPreferences mPreferences = getSharedPreferences(context);
		return mPreferences.getBoolean(tag, defaultValue);
	}
	
	public static boolean saveBoolean(Context context, String tag,boolean value)
	{
		SharedPreferences mPreferences = getSharedPreferences(context);
		Editor mEditor = mPreferences.edit();
		mEditor.putBoolean(tag, value);
		return mEditor.commit();
	}
	
	
	protected static SharedPreferences getSharedPreferences(Context context)
	{
		return context.getSharedPreferences(PRE_NAME, 0);
	}
	
}
